$(function(){
	$('#btn01').on('click', function(){
		//appendConsole( func_test_date() ); 
		func_ajax_submit();
	});
});

function appendConsole(content) {
	var old = $('#console').html() + "<br>";
	$('#console').html(old + content);
}

function func_test_date(){
	var date = new Date();
	return date.getTime();
}

function func_ajax_submit() {
	$.ajax({
		type: 'POST',
		url: '/tools/md5/ajaxSubmit',
		data: {
			'who' : 'repeatedSubmission',
			'startDate' : '2016-07-02 06:02:23',
			'dep' : 2005002
		},
		dataType: 'json',
		success: function(data){
			if(data){
				appendConsole( "data is " + data['msg'] );
			}else{
				$('#console').empty();
				$('#console').html("data is " + data['msg']);
			}
		}
	});
}


function func_old_ajaxfunc() {
	if (this.promise_ && this.promise_.state() === 'pending') {
		return;
	}
	return this.promise_ = $.ajax({
		type: 'POST',
		url: '/his/repeatedSubmission',
		data: {'who' : 'repeatedSubmission'},
		dataType: 'json',
		success: function(data){
			if(data){
				appendConsole( "data is " + data );
			}else{
				$('#console').empty();
				$('#console').html("data is " + data);
			}
		}
	});
}


